package com.avic.rong.api.focus_fans;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

public class FansApi extends BaseApi {


    private Integer pageNo;
    private Integer pageSize;
    private String token;
    private String url;
    private String userId;


    public void setOffset(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public void setArgument(Integer pageNo, Integer pageSize, String token,String userId, String url){
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.token = token;
        this.url = url;
        this.userId = userId;
    }


    public FansApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService httpPostService = retrofit.create(HttpPostService.class);
        return httpPostService.fansList(pageNo,pageSize,token,userId,url);
    }
}
